#!/bin/bash
new_content="export ZK_HOME=/app/pmapp/data/rongshu/apache-zookeeper-3.8.4-bin/"
new_content_1="export PATH=\$PATH:\$JAVA_HOME/bin:\$ZK_HOME/bin"
echo "往配置文件最后一行添加配置"
echo -e "$new_content\n$new_content_1" >> ~/.bash_profile
echo "使配置文件生效"
source /app/pmapp/.bash_profile
# 后台启动zk
cd /app/pmapp/data/rongshu/apache-zookeeper-3.8.4-bin/bin/ || exit
zkServer.sh start
echo "查看zk状态"
echo "`zkServer.sh status`"
